package com.sedshop.shop.interfaces;/**
 * Created by Administrator on 2016/4/28.
 */

import com.sedshop.shop.entity.WeatherTest;

import retrofit.Call;
import retrofit.http.GET;
import retrofit.http.Header;
import retrofit.http.Query;
import rx.Observable;

/**
 * 作者：Administrator on 2016/4/28 09:12
 * 邮箱：314960314@qq.com
 */
public interface APIServiceTest {

    //接口说明文档 http://apistore.baidu.com/apiworks/servicedetail/112.html
    /**
     * http://apis.baidu.com/apistore/weatherservice/citylist
     * 参数  apikey
     * 参数  cityname
     * @param apiKey
     * @param keyword
     * @return
     */

    @GET("/apistore/weatherservice/citylist")
    Call<WeatherTest> getWeather(@Header("apiKey") String apiKey,@Query("cityname") String keyword);
    //返回回调

    /**
     * retrofit 支持 rxjava 整合
     * 这种方法适用于新接口
     */
    @GET("/apistore/weatherservice/citylist")
    Observable<WeatherTest> getWeatherData(@Header("apiKey") String apiKey,@Query("cityname") String keyword);
    //返回Observable
}
